#include <iostream>
#include <set>
#include <deque>
#include <functional>
#include <iomanip>
#include <algorithm>
using namespace std;

//平均分有同分情况，使用multiset
multiset<double, greater<double>> high;

int main()
{
    int n, k, m;
    cin >> n >> k >> m;
    for (int i = 0; i < n; i++)
    {
        //deque方便去头去尾
        deque<double> score;
        double sum = 0;
        for (int j = 0; j < k; j++)
        {
            double val;
            cin >> val;
            sum += val;
            score.push_back(val);
        }
        sort(score.begin(), score.end());
        sum -= score.front();
        sum -= score.back();
        double avg = sum / (double)(score.size() - 2.0);
        high.insert(avg);
    }
    //最高分前m个要非降序（“非降序”提示了会有同分情况）输出，从降序set中拿到前m个大的存到升序set中
    multiset<double> output;
    for (multiset<double, greater<double>>::iterator it = high.begin(); it != high.end(), m != 0; it++, m--)
    {
        output.insert(*it);
    }
    for (multiset<double>::iterator it = output.begin(); it != output.end(); it++)
    {
        if (it != output.begin())
        {
            cout << " ";
        }
        cout << fixed << setprecision(3) << *it;
    }
    return 0;
}